<template>
  <el-button type="primary" size="small" class="tag-button" :class="{ clicked: isSelected }" @click="$emit('click')">
    {{ text }}
  </el-button>
</template>

<script setup>
import { ElButton } from 'element-plus';

const props = defineProps({
  text: {
    type: String,
    required: true,
  },
  isSelected: {
    type: Boolean,
    default: false,
  },
});
</script>

<style scoped>
.tag-button {
  margin: 0px 0px;
  background-color: black !important;
  color: white !important;
  border: none !important;
  outline: none !important;
  padding: 14px 20px;
  font-size: 10px;
  border-radius: 24px;
  width: 60px;
  height: 32px;
  min-width: 60px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-button:hover {
  color: red !important;
}

.tag-button.clicked:hover {
  color: white !important;
}

.tag-button:focus {
  box-shadow: none !important;
}

.tag-button.clicked {
  background-color: red !important;
}
</style>